------------------------------------------------------------------------------------------------------------------------------
      name:  <unnamed>
       log:  C:/Users/silvio/Documents/CVR/ryp/output/s2_dokrig_test.log
  log type:  text
 opened on:  28 Oct 2018, 20:47:38

. 
. matrix drop _all

. set more off

. 
. set matsize 1392

. scalar nstrata=58                      /*=58, CVR strata*/

. scalar signi=2

. 
. 
. use "${data}/${datafile}" , replace

. 
. 
. sort i perpe k

. ren y yy

. mkmat yy

. 
. forval perpel= 1/3{            /*Original*/
  2. scalar perpeh=`perpel'
  3. run "$code/cvrkrigrun_test"
  4. 
. scalar nmao_full=rowsof(mao_full)
  5. matrix ones=J(1,nmao_full,1)
  6. 
. matrix mao_full=mao_full,ones',ones'
  7. 
. scalar j=1
  8. while j<=nmao_full{
  9. matrix mao_full[j,7]=mao_full[j,3]-mao_full[j,5]
 10. matrix mao_full[j,8]=100*mao_full[j,7]/mao_full[j,5]
 11. scalar j=j+1
 12. }
 13. 
. 
. matrix sum_mao_full=ones*mao_full
 14. 
. scalar j=1
 15. while j<=nmao_full{
 16. matrix mao_full[j,4]=int(sqrt(mao_full[j,4])+0.5)
 17. matrix mao_full[j,6]=int(sqrt(mao_full[j,6])+0.5)
 18. scalar j=j+1
 19. }
 20. 
. 
. 
. matrix sum_mao_full[1,4]=int(sqrt(sum_mao_full[1,4])+0.5)
 21. matrix sum_mao_full[1,6]=int(sqrt(sum_mao_full[1,6])+0.5)
 22. matrix sum_mao_full[1,8]=100*sum_mao_full[1,7]/sum_mao_full[1,5]
 23. 
. matrix list mao_full
 24. matrix list sum_mao_full
 25. 
. }

mao_full[58,8]
             c1          c2          c3          c4          v2          v3          r1          r1
 r1           1         367         781         223         767          91          14   1.8252934
 r2           2          42         103          11          48           5          55   114.58333
 r3           3          29          35          11          31           2           4   12.903226
 r4           4          57          72          42          95          23         -23  -24.210526
 r5           5          71         155         101         206          63         -51  -24.757282
 r6           6          22          36           9          26           3          10   38.461538
 r7           7          40          42          20          61          26         -19  -31.147541
 r8           8          23         104           5          29           6          75   258.62069
 r9           9         185         234          34        1679        1544       -1445  -86.063133
r10          10          19          57          10          20           1          37         185
r11          11         675        1041         348        1552         183        -511  -32.925258
r12          12         141         335          69         453         157        -118  -26.048565
r13          13          12          27           7          25          12           2           8
r14          14        1260        2394         698        2762         186        -368  -13.323678
r15          15          68         134          34          96          12          38   39.583333
r16          16          26          40          12         114          97         -74  -64.912281
r17          17          47          69          17         140         109         -71  -50.714286
r18          18          17          65           7          24           5          41   170.83333
r19          19         168         295          63         699         419        -404  -57.796853
r20          20         341         734          77         744         136         -10   -1.344086
r21          21          68         104          14          91          21          13   14.285714
r22          22          68         119          18          70           2          49          70
r23          23         199         411          52         371          51          40   10.781671
r24          24          37         112          11          44           9          68   154.54545
r25          25         956        1668         345        1413          58         255   18.046709
r26          26         156         286          35         287          48          -1  -.34843206
r27          27          68         100          20          83          12          17   20.481928
r28          28         144         229          34         434          95        -205  -47.235023
r29          29          47          71          13          75          14          -4  -5.3333333
r30          30          72         158          16          95          13          63   66.315789
r31          31         161         328          39         499         139        -171  -34.268537
r32          32         378         887         108         599          66         288   48.080134
r33          33          89         217          38         188          92          29   15.425532
r34          34          62         153          26         132          34          21   15.909091
r35          35         436        1058         136         591          26         467   79.018613
r36          36         623         877         193        1495         259        -618  -41.337793
r37          37         489         772          72         750          71          22   2.9333333
r38          38          17          33           3          33          13           0           0
r39          39          32          63           5          33           1          30   90.909091
r40          40         137         297          28         173          11         124   71.676301
r41          41         101         173          22         263         130         -90  -34.220532
r42          42          55          75          11          64           5          11     17.1875
r43          43          79         115          10         151          50         -36   -23.84106
r44          44          43          94          10          93          34           1   1.0752688
r45          45         362         560         143         610          71         -50  -8.1967213
r46          46          70         125          17         201          61         -76  -37.810945
r47          47          91         314         126         130          14         184   141.53846
r48          48         145         283          35         238          36          45   18.907563
r49          49          23          42           4          56          25         -14         -25
r50          50          35          61          16          57          32           4   7.0175439
r51          51         111         224          52         172          32          52   30.232558
r52          52         170         268          79         500         218        -232       -46.4
r53          53          94         109          17         102           4           7   6.8627451
r54          54          19          24           7          24           4           0           0
r55          55          48          58           9          53           4           5   9.4339623
r56          56          60         168          23          83          16          85   102.40964
r57          57         139         287          60         525         197        -238  -45.333333
r58          58          72         205          30         167         107          38   22.754491

sum_mao_full[1,8]
            c1          c2          c3          c4          v2          v3          r1          r1
r1        1711        9566       17881         972       20516        1721       -2635  -12.843634

mao_full[9,8]
            c1          c2          c3          c4          v2          v3          r1          r1
r1          11         570        1179         419         692          96         487   70.375723
r2          14        1270        2088        1849        1628         204         460   28.255528
r3          25         422         621         250         958          93        -337  -35.177453
r4          32         163         232          24         751         468        -519  -69.107856
r5          35         246         585         141         294          53         291   98.979592
r6          36         426        1258         185         637         183         621   97.488226
r7          47         258         369         395         475          86        -106  -22.315789
r8          48         320        1306         250         426         123         880   206.57277
r9          51         321         480         425         427         123          53   12.412178

sum_mao_full[1,8]
           c1         c2         c3         c4         v2         v3         r1         r1
r1        299       3996       8118       2028       6288        594       1830  29.103053

mao_full[23,8]
             c1          c2          c3          c4          v2          v3          r1          r1
 r1           1         139         472         166        1023         475        -551  -53.861193
 r2           4          40         122          63         295         275        -173  -58.644068
 r3           9          53         252         101         170         100          82   48.235294
 r4          11         234         357         254        1070         423        -713  -66.635514
 r5          12         124         672         348         185          75         487   263.24324
 r6          14         689        4847         784        2720        1357        2127   78.198529
 r7          16           9          24          14          17          11           7   41.176471
 r8          17          13          50          13          27          14          23   85.185185
 r9          20          89         236          47         173         119          63   36.416185
r10          23          26          65          16          51          35          14    27.45098
r11          25          31         134          25          41           9          93   226.82927
r12          26          64         146          40         187         152         -41  -21.925134
r13          28          28          67          18          65          28           2   3.0769231
r14          32          57         248          37         167          61          81   48.502994
r15          36          75         177          51         441         284        -264  -59.863946
r16          37          74         186          26         414         217        -228  -55.072464
r17          40          30          57          15          85          69         -28  -32.941176
r18          43          14          58           4          29          15          29         100
r19          45         120         494         131         488         213           6   1.2295082
r20          48          51         207          33         320         294        -113    -35.3125
r21          49           5          13           2           7           3           6   85.714286
r22          55          15          49          15          40          32           9        22.5
r23          56          38         107          40         109          89          -2  -1.8348624

sum_mao_full[1,8]
           c1         c2         c3         c4         v2         v3         r1         r1
r1        647       2018       9040        934       8124       1629        916  11.275234

. 
. capture log close
